When I was 18, I spent 2 years in the Singapore Armed Forces & Police Force for mandatory military conscription. I learned the basics of soldiering, how to handle a rifle, & how to throw a grenade. One interesting effect of being in an environment that normalized the mechanics of using lethal force, I found myself asking this theoretical question - if I were ever drafted into war, would I be able to live with myself killing another human being?
That's a pretty hairy moral dilemma for an 18 year-old to consider.
Imagining myself taking another life sent shivers down my spine, and it went against my belief that all life is valuable. But given that being drafted is often not a choice, the question still remains. A concept that helped me reconcile my internal conflict was the idea of 'role-differentiation'.
Role differentiation is the concept that certain roles within an organization or society develop separate sets of ethical standards & norms. It is what allows soldiers to relax the ethical boundary of killing because of it's centrality to the role, or journalists who may use deception to uncover institutional corruption, or doctors who maintain confidentiality of patient information even if it might benefit society to release it.
It's important to realize that role differentiation is not a characteristic naturally present in certain roles, but it is conferred onto those roles by special societal agreement. Soldiering & the case of journalism is only permissible because society has agreed, on the whole, that those specific circumstances with their specific boundaries and conditions make it permissible to breach certain ethical boundaries.
Otherwise, this can be misused to absolve oneself from all professional moral responsibility, or to enter into unethical professions. For example, it would be inadequate to use role-differentiation as a way to justify operating a labor sweatshop.
In essence, the existence of role-differentiation doesn't remove the moral responsibility for an individual to select jobs that are ethical, to the extent that their agency allows. Since I have agency, I'm doing everything in my power to choose professions that are ethical serves the common good.